<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <title>秀恩爱-上传成功故事</title>
        <link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link rel="stylesheet" type="text/css" href="css/header.css">
        <link rel="stylesheet" type="text/css" href="css/story_user.css">
        <link href="css/footer.css" rel="stylesheet" type="text/css" />
        <script src="js/jquery-1.11.3.js"></script>
        
	    <script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"> </script>
	    <script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script>
    </head>

    <body>
       <header>
            <script src="js/header.js" ></script>
    </header>
	  <script>var uls=document.getElementsByClassName("menu_more");
	for(var i=0;i<uls.length;i++){
		uls.item(i).onmouseover=function(){
			this.getElementsByTagName("ul")[0].style.display="block";
		}
		uls.item(i).onmouseout=function(){
			this.getElementsByTagName("ul")[0].style.display="none";
		}
	}
		window.onload=function(){
	$.post("regLogServlet?t="+new Date(),{op:"getUserLoginInfo"},function(data){
		var str="";
		var pic="";
		
		if(data==0){ //没有登录
			str="<p><a href='register.html' class='set'>注册</a><a href='login.html' class='up'>登录</a></p>"
			pic="<a class='upload selfProfile' href='#'><img width='80' height='100' src='images/hzh2.png'></a><div class='link'><a class='lYellow' href='#'>编辑资料</a><a class='LGray' href='#'>认证</a></div>";
		}else{
			str="<p><a style='color:red' href='mybaihee.jsp' class='set'>"+data.loginUserInfo[0].NICKNAME+"</a><a href='login.html' class='up'>[切换用户]</a></p>"
			if(data.loginUserInfo[0].TOUXIANG==null){
				pic="<a class='upload selfProfile' href='#'><img width='80' height='100' src='images/hzh2.png'></a><div class='link'><a class='lYellow' href='#'>编辑资料</a><a class='LGray' href='#'>认证</a></div>";
			}else{
				pic="<a class='upload selfProfile' href='#'><img width='80' height='100' src='"+data.loginUserInfo[0].TOUXIANG+"'></a><div class='link'><a class='lYellow' href='#'>编辑资料</a><a class='LGray' href='#'>认证</a></div>";
			}
		}
		$(".setUp").html(str);
		$(".pic").html(pic);
	},"json");
}
	</script>
        
        <div id="baihe_page">
            <div id="baihe_content" class="cols_bj">
<div id="baihe_col1">
<div class="subNav">
<div class="pic">
<a class="upload selfProfile" href="#">
<img width="80" height="100" alt="" src="images/hzh2.png">
<span id="uploadPhoto" style="display: none;">上传形象照</span>
</a>
<div class="link">
<a class="lYellow" href="#">编辑资料</a>
<a class="LGray" href="#/">认证</a>
</div>
</div>
<div class="menuCont skBg1">
<div class="title">
<a href="#">我的百合</a>
</div>
</div>
<div class="menuCont skBg2">
<div class="title">
<a href="#">会员服务</a>
</div>
<ul>
<li>
<a href="#">
<span>·</span>
我的订单
</a>
</li>
<li>
<a href="#">
<span>·</span>
水晶会员
</a>
</li>
<li>
<a href="#">
<span>·</span>
至尊会员
</a>
</li>
<li>
<a href="#">
<span>·</span>
金至尊会员
</a>
</li>
<li>
<a href="#" target="_blank">
<span>·</span>
红娘一对一服务
</a>
</li>
<li>
<a href="#">
<span>·</span>
购买红豆
</a>
</li>
<li>
<a href="#">
<span>·</span>
焦点明星
</a>
</li>
<li class="menuHYFF" style="display:none">
<li class="menuHYFF" style="display:none">
<li id="zhuiqiu3" class="menuHYFF" style="display:none">
<li class="menuHYFF" style="display:none">
<li class="menuHYFF" style="display:none">
</ul>
<div class="more">
<a class="downIcon" href="#">更多</a>
</div>
</div>
<div class="menuCont skBg3">
<div class="title">
<a href="#">百合应用</a>
</div>
<ul>
<li>
<a href="#">
<span>·</span>
恋爱帮帮忙
<img width="22" height="10" alt="new" src="images/new.gif">
</a>
</li>
<li>
<a href="#">
<span>·</span>
丘比特之箭
<img width="22" height="10" alt="new" src="images/new.gif">
</a>
</li>
<li>
<a href="#">
<span>·</span>
幸运宝藏
<img width="22" height="10" alt="new" src="images/new.gif">
</a>
</li>
<li>
<a href="#">
<span>·</span>
百合说说
</a>
</li>
<li>
<a href="#">
<span>·</span>
成长俱乐部
<img width="22" height="10" alt="new" src="images/new.gif">
</a>
</li>
<li>
<a href="#">
<span>·</span>
赚取红豆
</a>
</li>
<li>
<a href="#">
<span>·</span>
相亲助手
</a>
</li>
<li>
<a href="#">
<span>·</span>
恋爱ing
</a>
</li>
<li>
<a href="#">
<span>·</span>
花瓣抽奖
</a>
</li>
<li class="menuBHYY" style="display:none">
<li class="menuBHYY" style="display:none">
</ul>
<div class="more">
<a class="downIcon" href="#">更多</a>
</div>
</div>
<div class="menuCont">
<div class="title">
<a href="#">百合帐户</a>
</div>
<ul>
<li>
<a href="#">
<span>·</span>
实名认证
</a>
</li>
<li>
<a href="#">
<span>·</span>
择偶意向
</a>
</li>
<li>
<a href="#">
<span>·</span>
帐号设置
</a>
</li>
<li>
<a href="#">
<span>·</span>
修改密码
</a>
</li>
<li>
<a href="#">
<span>·</span>
黑名单
</a>
</li>
</ul>
</div>
<div class="leftAd">
<img src="images/storyadv1.jpg" />
</div>
</div>
</div>            
				
                <div id="baihe_col6">
                    <div class="list_subnav">
                        <ul>
                            <li><a href="uploadstory.jsp">编辑成功故事空间</a></li>
                            <li class="now"><a href="#">上传成功故事</a></li>
                            <li><a href="uploadstory3.html">上传甜蜜合影</a></li>  
                            <li><a href="uploadstory4sss.jsp">管理甜蜜合影</a></li>                              
                        </ul>                      
                    </div>
                    <div class="list_content">
                        <form method="post" id="aFrm" action="">
                            <div class="pic_upload">
                                <dl>
                                    <dt><strong>*</strong>标    题：</dt>
                                    <dd><input style="width:380px;" name="titlec" id="titlec" type="text" /></dd>
                                </dl>
                                <dl>
                                    <dt><strong>*</strong>你们的甜蜜进程：</dt>
                                    <dd>
                                         <select name="loveStatus" id="loveStatus" >
                                            <option value="3" selected >恋爱了</option>
                                            <option value="4">结婚了</option>
                                        </select>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>内    容：</dt>
                                    	<div>
    										<script id="editor" type="text/plain" style="width:663px;height:300px;"></script>
    									</div> </br>
                                </dl>
                                <dl>
                                    <dt>&nbsp; <label><input class="checkbox" id="is_read" type="checkbox" checked></input></label></dt>
                                    <dd>我已经阅读并同意《<a class="name" href="http://help.baihe.com/index.php?action=list&cat=585&listid=24" target="_bland">发布成功故事注意条款</a>》</dd>
                                </dl>
                               
                                <div class="btn">                                               
                                    <div class="btnGray26"><a href="javascript:autoSave();" >保存并上传照片</a></div>                                                
                                </div>
                        </form>
                    </div>
                </div>

            </div>

            <!--headbaihe_col6-->
            <div id="bannner_bg"><div class="ad"><a tareget="_blank" href="#">
            <img src="images/storyadv2.jpg"></a></div></div>
            <!--AD-->
        </div>
        <!--headContent-->

        <script type="text/javascript" src="js/foot.js" charset='utf-8'></script>
        <!--headFooterEnd-->
        </div>
        <!--点击上传后弹出浮层，提示信息（star）-->
        <div class="pop_bg" style="width:488px; margin:-124px 0 0 -244px; text-align:left; display: none;" id="block_show">
            <div class="pop_userApp sp10">
                <h3><div class="pop_close" onclick=" window.location.href='index.php?action=manageStory'"></div>提示</h3>
                <div class="popGray" style="padding:15px;">

                    <strong style="color:#ff6600">上传故事成功</strong><br />
                    温馨提示：您发表故事后，我们的工作人员会尽快审核您上传的内容，请耐心等待。
                    <br />
                    <p style="padding:15px 0 0; margin:7px 0 0; border-top:1px dotted #d0d0d0;">您的成功故事相册已经开通了，快来秀秀你们的甜蜜合影吧！
                    </p>
                </div>
                <div class="pop_btn_center">
                    <div class="pop_btn"><span><a href="index.php?action=uploadPhoto">立即上传幸福照片</a></span></div>
                </div>
            </div>
        </div>
        <!--点击上传后弹出浮层，提示信息（end）-->
    </body>
</html>
<script language="javascript">
	var ue = UE.getEditor('editor');
    
      function autoSave( ){
          if($("#titlec").val()==''){
              alert("标题不能为空");
              return false;
          }
          if($("#titlec").val().length>20){
              alert("输入的标题不能超过20个汉字");
              return false;
          }
          if(!$("#loveStatus").val()){
              alert("请选择你们的甜蜜进程");
              return false;
          }
          if(ue.getContent()==null || ""==ue.getContent()){
              alert("请填写内容");
              return false;
          }
          
          if(!$("#is_read").attr("checked")){
        alert("请选中我已阅读并同意《发布成功故事注意条款》");
        return false;
    }   
          title = $("#titlec").val();
          content =ue.getContent();
          loveStatus = $("#loveStatus").val();
          
      $.post("storyInfoServlet?t="+new Date(),{op:"addstory_story",title:title,content:content,loveStatus:loveStatus},function(data){
     		if(data>0){
     			alert("恭喜你保存成功");	
     			location.href="uploadstory3.html";
     		}
      });

  }  
</script>
